<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        /*div{*/
            /*width: 100px;*/
            /*height: 100px;*/
            /*background-color: #f00;*/
            /*overflow: hidden;*/
        /*}*/

        div.box1 {
            background-color: red;
            overflow: hidden;
            *zoom: 1;
        }

        div.box1 p {
            background-color: blue;
            width: 90px;
            float: left;
        }

        /*.box1::after {*/
            /*content: "";*/
            /*height: 0;*/
            /*display: block;*/
            /*visibility: hidden;*/
            /*clear: both;*/
        /*}*/

        div.box2 {
            background-color: tomato;
        }

        div.box2 p {
            background-color: yellow;
            float: left;
            width: 90px;
        }

    </style>
</head>
<body>
<div class="box1">
    <p>文字内容1</p>
    <p>文字内容1</p>
    <p>文字内容1</p>
</div>
<div class="box2">
    <p>文字内容2</p>
    <p>文字内容2</p>
    <p>文字内容2</p>
</div>
</body>
</html>